/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import entities1.Notify;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 *
 * @author takamflore
 */
@Stateless
public class NotifyDaoImpl implements NotifyDao{
    @PersistenceContext(unitName = "meteoCal_PU")
    private EntityManager em;
    Notify notify;
    List<Notify> notifies;
    
    @Override
  public void addNotify(Notify notify){
      em.persist(notify);
  }
   @Override
    public List<Notify> getAllNotify(){
        notifies=em.createNamedQuery("Notify.findByIDInvitation").getResultList();
        return notifies;
    }
    @Override
   public void updateNotify(Notify notify){
       em.merge(notify);
   }
    
}
